package edu.sctu.wangxiaoqiang.day20150609.util;


import edu.sctu.wangxiaoqiang.day20150609.appbean.PeopleAppbean;

/**
 * Created by user25 on 2015/6/9.
 */
public class BaoGuoDeth {
    private PeopleAppbean peopleAppbean;
    private String weijin;

    public BaoGuoDeth(PeopleAppbean peopleAppbean,String weijin){
        this.peopleAppbean = peopleAppbean;
        this.weijin = weijin;
    }

    public boolean chaBaoGuo(){
        boolean is_weijin = false;
        if(this.peopleAppbean.isIs_baoguo()){
            if(this.weijin.contains(this.peopleAppbean.getBaoguoname())) {
                is_weijin = true;
            }
        }else {
            is_weijin = false;
        }
        return is_weijin;
    }

    public boolean chaWater(){
        boolean is_weijin = false;
        if(this.peopleAppbean.isIs_water()){
            if (this.weijin.contains(this.peopleAppbean.getWatername())){
                is_weijin = true;
            }
        }else {
            is_weijin = false;
        }
        return is_weijin;
    }
}
